package com.bytedance.common.a;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

final class d extends BroadcastReceiver {
    private final c a;

    d(com.bytedance.common.a.c arg1) {
        this.a = arg1;
    }

    public final void onReceive(Context arg6, Intent arg7) {
        if (!this.isInitialStickyBroadcast() && ("android.net.conn.CONNECTIVITY_CHANGE".equals(arg7.getAction()))) {
            int v3 = i.b(arg6);
            boolean v1 = false;
            String v0 = null;
            if (v3 == 1) {
                c.b(this.a.a);
                v0 = i.c(arg6);
                if (v0 != null && !v0.equals(this.a.d)) {
                    c.a(this.a.b);
                    this.a.b.clear();
                    this.a.d = v0;
                    v1 = true;
                }

                if (v1) {
//                    goto label_37;
                } else if (this.a.e == v3) {
//                    goto label_37;
                } else {
                    c.a(this.a.b);
                }
            }

            label_37:
            HttpDns.a("connectivity change: " + v3 + " clear: " + v1 + ", bssid:" + v0);
            if (i.a(arg6)) {
                c.b(this.a.b);
                if (this.a.e != v3) {
                    c.a(this.a.a);
                }
            }

            this.a.e = v3;
        }
    }
}

